<?php

class PermisosController extends AppController {
    
    public $layout = "admin";

    public $sl_permisos = array(
        "actions" => array("V" => "view", "E" => "edit", "D" => "delete"),
        "filters" => array(
            array("name" => 'Permiso.nombre', "label" => 'Nombre'),
            array("name" => 'Permiso.controller', "label" => 'Controlador'),
            array("name" => 'Permiso.action', "label" => 'Acción')
        ),
        "columns" => array(
            array("name" => 'Permiso.nombre', "label" => 'Nombre'),
            array("name" => 'Permiso.controller', "label" => 'Controlador'),
            array("name" => 'Permiso.action', "label" => 'Acción')
        )
    );
    public $maint_permisos = array(
        "fields" => array(
            "Datos del Permiso" => array(
                array("name" => 'nombre', "label" => 'Nombre'),
                array("name" => 'controller', "label" => 'Controlador'),
                array("name" => 'action', "label" => 'Acción')
            )
        )
    );

    public function add() {
        $this->maint = $this->maint_permisos;
        parent::add();
    }

    public function edit($id = null) {
        $this->maint = $this->maint_permisos;
        parent::edit($id);
    }

    public function index() {
        $this->search_list = $this->sl_permisos;
        parent::index();
    }

    public function view($id = null) {
        $this->maint = $this->maint_permisos;
        parent::view($id);
    }

}